home *** CD-ROM | disk | FTP | other *** search
- /****i* SOURCE_FILE/INFO
- *
- * NAME
- * ImageOutputSettings.js
- *
- * USAGE
- * Part of Netobjects JavaScript Library.
- *
- * COPYRIGHT
- * Copyright ⌐ 2000-2005 Website Pros, Inc.
- * All Rights Reserved.
- *
- * This is an unpublished work protected by Website Pros, Inc.
- * as a trade secret, and is not to be used or disclosed except as
- * expressly provided in a written license agreement executed by
- * you and Website Pros, Inc.
- *
- * <copyright@websitepros.com>
- *
- * NOTES
- * JavaScript code.
- *
- *****/
- if (!IS.isModuleInitialized("IS.NOF.ImageOutputSettings"))
- {
- /****h* NOF_JavaScript_Library/NOF.ImageOutputSettings
- *
- * NAME
- * NOF.ImageOutputSettings
- *
- * DESCRIPTION
- *
- * External dependencies: NOF.ConfigFile
- ****/
-
- /**
- * Constructor
- * @param name
- **/
- function NOF_ImageOutputSettings(name) {
-
- this.__proto__ = NOF_ImageOutputSettings.prototype ;
-
- if ( arguments.length == 0 )
- this.SUPER();
- else
- this.SUPER( name );
-
- this.CONSTANTS = {
- PROFILE_TYPE : "OutputSettings",
- XML_TEMPLATE : '<outputSettings><name/><quality/><format/></outputSettings>',
- XPATH_FORMAT : "outputSettings/format",
- XPATH_QUALITY : "outputSettings/quality",
- XPATH_NAME : "outputSettings/name"
- }
-
- this.configModuleType = this.CONSTANTS.PROFILE_TYPE;
- this.XMLTemplate = this.CONSTANTS.XML_TEMPLATE;
-
- }
-
- NOF_ImageOutputSettings.inherits( NOF.ConfigFile );function NOF_ImageOutputSettings_ProtoBuilder() {
-
- var method = NOF_ImageOutputSettings.prototype;
-
- // public interface
- method.setName = setName;
- method.getName = getName;
-
- method.setFormat = setFormat;
- method.getFormat = getFormat;
-
- method.setQuality = setQuality;
- method.getQuality = getQuality;
-
- method.equals = equals;
-
- // methods implementation
- function setName(newName) {
- this.verifyDoc();
-
- var Name = this.xmlDoc.selectSingleNode(this.CONSTANTS.XPATH_NAME);
- Name.text = newName;
- }
-
- function getName() {
- this.verifyDoc();
-
- var Name = this.xmlDoc.selectSingleNode(this.CONSTANTS.XPATH_NAME);
- return Name.text;
- }
-
- function setQuality(newQuality) {
- this.verifyDoc();
-
- var Quality = this.xmlDoc.selectSingleNode(this.CONSTANTS.XPATH_QUALITY);
- Quality.text = newQuality;
- }
-
- function getQuality() {
- this.verifyDoc();
-
- var Quality = this.xmlDoc.selectSingleNode(this.CONSTANTS.XPATH_QUALITY);
- return Quality.text;
- }
-
- function setFormat(newFormat) {
- this.verifyDoc();
-
- var format = this.xmlDoc.selectSingleNode(this.CONSTANTS.XPATH_FORMAT);
- format.text = newFormat;
- }
-
- function getFormat() {
- this.verifyDoc();
-
- var format = this.xmlDoc.selectSingleNode(this.CONSTANTS.XPATH_FORMAT);
- return format.text;
- }
-
- function equals (obj) {
- if (this.getName() == obj.getName())
- return true;
- return false;
- }
-
- }
-
-
- NOF_ImageOutputSettings_ProtoBuilder();
- NOF.__proto__.ImageOutputSettings = NOF_ImageOutputSettings;
-
- }